#ifndef P_WINDOW_EVENT_H
#define P_WINDOW_EVENT_H

#include "Event/PEvent.h"

namespace Piccolo
{
    class PFrameBufferResizeEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_FRAME_BUFFER_RESIZE)
        PFrameBufferResizeEvent(uint32_t width, uint32_t height) : mWidth(width), mHeight(height) { }

        [[nodiscard]] std::string ToString() const override
        {
            return PEvent::ToString() + "( width=" + std::to_string(mWidth) + ", height=" + std::to_string(mHeight) + " )";
        }

        uint32_t mWidth;
        uint32_t mHeight;
    };

    class PWindowResizeEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_WINDOW_RESIZE)
        PWindowResizeEvent(uint32_t width, uint32_t height) : mWidth(width), mHeight(height) { }

        [[nodiscard]] std::string ToString() const override
        {
            return PEvent::ToString() + "( width=" + std::to_string(mWidth) + ", height=" + std::to_string(mHeight) + " )";
        }

        uint32_t mWidth;
        uint32_t mHeight;
    };

    class PWindowFocusEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_WINDOW_FOCUS)
        PWindowFocusEvent() = default;
    };

    class PWindowLostFocusEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_WINDOW_LOST_FOCUS)
        PWindowLostFocusEvent() = default;
    };

    class PWindowMoveEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_WINDOW_MOVED)
        PWindowMoveEvent(uint32_t xPos, uint32_t yPos) : mXPos(xPos), mYPos(yPos) { }

        [[nodiscard]] std::string ToString() const override
        {
            return PEvent::ToString() + "( xPos=" + std::to_string(mXPos) + ", yPos=" + std::to_string(mYPos) + " )";
        }

        uint32_t mXPos;
        uint32_t mYPos;
    };

    class PWindowCloseEvent : public PEvent
    {
    public:
        EVENT_CLASS_TYPE(EVENT_TYPE_WINDOW_CLOSE)
        PWindowCloseEvent() = default;
    };
}

#endif